#include <iostream>
#include<set>
using namespace std;
int _sum(const multiset<int, greater<>>& ms)
{
    int sum = 0;

    multiset<int, greater<>>::iterator it = ms.begin();
    while (it != ms.end())
    {
        sum += *it;
        it++;
    }

    return sum;
}

int _multisum(const multiset<int, greater<>>& ms)
{
    int sum = 1;
    multiset<int, greater<>>::iterator it = ms.begin();
    while (it != ms.end())
    {
        sum *= *it;
        it++;
    }


    return sum;
}
int main()
{
    int count = 0;
    multiset<int, greater<>> ms;
    int tmp;
    int m, i = 0;
    cin >> m;
    while (i++ < m)
    {
        cin >> tmp;
        ms.insert(tmp);
    }
    multiset<int, greater<>>::iterator it = ms.begin();
    while (it != ms.end())
    {
        if (_sum(ms) > _multisum(ms))
            count++;

        ms.erase(it++);
    }
    printf("%d\n", count);

}